package services;

import java.util.List;
import java.util.Map;

/**
 * Created by IntelliJ IDEA.
 * User: shameera
 * Date: 1/30/12
 * Time: 10:53 PM
 * To change this template use File | Settings | File Templates.
 */
public class PojoServiceClass {

    public String testObjectIn(PojoTestClass testClass, String type){
        return "succeeded";
    }

    public PojoTestClass testObjectReturn(String name, int age) {
        PojoTestClass test = new PojoTestClass();
        test.setName(name);
        test.setAge(age);
        return test;
    }

    public String[] testArrayOut(String a, String b, String c) {
        return new String[]{a, b, c};
    }

    public String testArrayIn(String [] array , int count) {
        if (array == null) {
            return "array is null";
        } else{
            return array[0];
        }
    }
    public PojoTestClass testObjArrayIn(PojoTestClass [] array , int count) {
        if (array == null) {
            return null;
        } else {
            return array[0];
        }
    }
    
    public int[] testIntArrayInOut(int[] ints){
        return ints;
    }

    public String testListIn(List<String> list, String echo) {
        return list.get(0);
    }

    public String testMapIn(Map<Integer, String> aMap) {
        System.out.println(aMap.toString());
        return aMap.get(0.0);

    }
}
